﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ServiceModel.Description;
using NotificationServer.ServiceLayer.Data;

namespace NotificationServer.ServiceLayer.Contracts
{
    [ServiceContract]
    public interface IDeviceForMobile
    {
        [OperationContract]
        [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "/Device/{name}/{device_type}/{registration_id}")]
        DeviceData RegisterDevice(string name, string device_type, string registration_id);

        [OperationContract]
        [WebInvoke(Method = "PUT", BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "/Device/{guid}/{name}/{registration_id}")]
        DeviceData UpdateDevice(string guid, string name, string registration_id);

        [OperationContract]
        [WebInvoke(Method = "DELETE",  UriTemplate = "/Device/{guid}")]
        DeviceData UnregisterDevice(string guid);

        [OperationContract]
        Device[] GetDevices();
    }
}